<?php
//收费
/**
 * Created by PhpStorm.
 * User: 戎大富
 * Date: 2018/8/22
 * Time: 9:41
 */
namespace app\admin\controller;
use think\Db;
class Charge extends Base {
    public function index(){
        if(request()->isAjax()){
            $list = Db::table('up_about_us')->where('id',input('param.id'))->setField('price_button',input('param.radio1'));
            if($list){
                return ['code' => 200, 'data' =>"", 'msg' => '编辑成功'];
            }else{
                return ['code' => 100, 'data' => '', 'msg' => '编辑失败'];
            }
        }
        $res = Db::table('up_about_us')->find();
        $this->assign('res',$res);
        return $this->fetch();
    }
}